﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
using Formboard.Resources;


namespace Formboard.Request
{
    public class CreateANewBoardRequest
    {
        public NewBoardDescription create_board = new NewBoardDescription();

        public CreateANewBoardRequest()
        {
        }

        public CreateANewBoardRequest(Board b)
        {
            create_board.name.value = b.name;
            create_board.owner.value = b.owner;
            create_board.invitee.value = b.invitee;
            create_board.size.value = b.size;
            create_board.owner_white.value = b.owner_white;
        }

        public class NewBoardDescription
        {
            public FieldWithStringValue name = new FieldWithStringValue();
            public FieldWithStringValue owner = new FieldWithStringValue();
            public FieldWithStringValue invitee = new FieldWithStringValue();
            public FieldWithStringValue size = new FieldWithStringValue();
            public FieldWithBoolValue owner_white = new FieldWithBoolValue();

        }

        public class FieldWithStringValue
        {
            [XmlAttribute("value")]
            public string value;
        }
        public class FieldWithBoolValue
        {
            [XmlAttribute("value")]
            public bool value;
        }
    }
}
